package com.serviceprovider.business.module.sp.transaction.services.dao.impl;

//~--- non-JDK imports --------------------------------------------------------

import com.serviceprovider.business.module.sp.transaction.model.TransactionStatus;

import org.springframework.jdbc.core.simple.ParameterizedRowMapper;

//~--- JDK imports ------------------------------------------------------------

import java.sql.ResultSet;
import java.sql.SQLException;

public class TransStatusMapper implements ParameterizedRowMapper<TransactionStatus> {
    @Override
    public TransactionStatus mapRow(ResultSet resultSet, int i) throws SQLException {
        TransactionStatus result = new TransactionStatus();

        try {
            result.setId(resultSet.getInt("id"));
            result.setActive(resultSet.getBoolean("active"));
            result.setMeaning(resultSet.getString("meaning"));
            result.setName(resultSet.getString("name"));
        } catch (Exception e) {}

        return result;
    }
}



